package edu.pw.treegrid.client.report.view;

import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.widgets.tree.TreeGrid;

import edu.pw.treegrid.shared.ReportColumnDescription;


public class ReportTreeGrid extends TreeGrid {
	public ReportTreeGrid(DataSource dataSource) {
		this.setDataSource(dataSource);
		this.setLoadDataOnDemand(true);
		this.setWidth100();
		this.setHeight("93%");
		//this.setHeight100();
		this.setCanEdit(false);  
		this.setNodeIcon("pieces/16/cube_blue.png");
		this.setFolderIcon("pieces/16/cubes_blue.png");
		this.setAutoFetchData(true);
		this.setCanFreezeFields(true);
		this.setCanReparentNodes(false);
		this.setUseAllDataSourceFields(true);
		this.setTitleField(ReportColumnDescription.NAME_COLUMN);
		//this.getField(ReportColumnDescription.NAME_COLUMN).setFrozen(true);
	}
}
